package com.ywu.api.standard.data;

import com.ywu.api.standard.dto.ApiRouterDto;
import com.ywu.api.standard.entity.ApiRouterEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
@Mapper
public interface ApiRouterRepository {
    int deleteByPrimaryKey(@Param("id") String id);

    int insert(@Param("model") ApiRouterEntity entity);

    int insertSelective(@Param("model") ApiRouterEntity entity);

    ApiRouterEntity selectByPrimaryKey(@Param("id") String id);

    int updateByPrimaryKeySelective(@Param("model") ApiRouterEntity entity);

    int updateByPrimaryKey(@Param("model") ApiRouterEntity entity);

    List<ApiRouterEntity> queryAllRoutes();

    ApiRouterEntity getRouteEntity(@Param("model") ApiRouterEntity entity);

    List<ApiRouterEntity> getRouteEntities(@Param("model") ApiRouterDto apiRouterDto);

    Integer getRouteEntitiesCount(@Param("model") ApiRouterDto apiRouterDto);

    List<ApiRouterEntity> getRouteInfoNoPage(@Param("model") ApiRouterDto apiRouterDto);

    ApiRouterEntity getEntityByCode(@Param("model") ApiRouterDto apiRouterDto);

    void updateCommonTypeById(@Param("model") ApiRouterDto apiRouterDto);

    List<ApiRouterEntity> queryByCodes(@Param("list") List<ApiRouterDto> apiRouterDto);
}
